package org.mech.sefer.entity.bible.model.reference;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.mech.sefer.entity.bible.model.SemanticBook;
import org.mech.sefer.entity.model.AbstractEntity;

@Entity
@Table(name = "T_REFS_BOOK_ATOM")
public class BookAtomRef extends AbstractEntity{

	private static final long serialVersionUID = -3129854693495242676L;

	@Id
	@SequenceGenerator(name = "T_BOOK_ATOM_REFS_SEQ", sequenceName = "T_BOOK_ATOM_REFS_SEQ", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "T_BOOK_ATOM_REFS_SEQ")
	@Column(name = "ID", nullable = false, updatable = false)
	private Long id;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "S_BOOK_ID")
	private SemanticBook semanticBook;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public SemanticBook getSemanticBook() {
		return semanticBook;
	}

	public void setSemanticBook(SemanticBook semanticBook) {
		this.semanticBook = semanticBook;
	}

}
